//
//  MACRO.h
//  TestDemo
//
//  Created by fengxijun on 16/6/16.
//  Copyright © 2016年 goappbox. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <objc/runtime.h>

#define declare_property_strong( __type, __name) \
@property (nonatomic, strong, setter=set__##__name:, getter=__##__name) __type * __name;

#define def_property_strong(__type, __name) \
- (__type *)__##__name   \
{ \
    return objc_getAssociatedObject(self,#__name);\
} \
- (void)set__##__name:(__type *)__name \
{ \
    objc_setAssociatedObject( self, #__name, __name, OBJC_ASSOCIATION_RETAIN_NONATOMIC );\
}